Partial Public Class Gestor

    Private Sub New()
    End Sub

    Public Property darGrupo() As Grupo
        Get
            Return objG
        End Get
        Set(ByVal pgrup As Grupo)
            objG = pgrup
        End Set
    End Property
    Public Function validar(ByVal user As String, ByVal pas As String) As Boolean
        Dim multi As New MultiEstudiante
        Return multi.autenticar(user, pas)
    End Function

    Public Sub registrarRubro(ByVal prubro As String, ByVal pporcentaje As String, ByVal ptipo As Boolean, ByVal pextra As Boolean)
        Me.darGrupo.establecerPlan(prubro, pporcentaje, ptipo, pextra)
    End Sub

    Public Sub modificarRubro(ByVal pid As Integer, ByVal prubro As String, ByVal pporcentaje As String, ByVal ptipo As Boolean, ByVal pextra As Boolean, ByVal pactual As Double, ByVal pinicial As Double)
        Me.darGrupo.modRubro(pid, prubro, pporcentaje, ptipo, pextra, pactual, pinicial)
    End Sub

    Public Sub eliminarRubro(ByVal pid As Integer)
        Me.darGrupo.elimRubro(pid)
    End Sub

    Public Function mostrarPlan(ByVal pidG As Integer) As ArrayList
        Dim multiG As New MultiGrupo()
        objG = multiG.obtenerGrupo(pidG)
        Return objG.mostrarP()
    End Function


    Public Function mostrarRubros() As DataTable
        Return objG.mostrarRubs()
    End Function

    Public Function mostrarRubros(ByVal pidG As Integer) As DataTable
        Dim multiG As New MultiGrupo()
        Dim objG As Grupo = multiG.obtenerGrupo(pidG)
        Return objG.mostrarRubs()
    End Function

    Public Function cargarGruposActivosWeb(ByVal pcarne As String) As ArrayList
        Dim multie As New MultiEstudiante()
        Return multie.cargar(pcarne)
    End Function
End Class